home *** CD-ROM | disk | FTP | other *** search
/ NeXT Education Software Sampler 1992 Fall / NeXT Education Software Sampler 1992 Fall.iso / Programming / Source / WAIS / next-ui / WaisQuestion.h < prev    next >
Encoding:
C/C++ Source or Header  |  1992-02-03  |  2.3 KB  |  93 lines

  1. // WaisQuestion.h
  2. //
  3. // Free software created 1 Feb 1992
  4. // by Paul Burchard <burchard@math.utah.edu>.
  5. // Incorporating:
  6. /* 
  7.    WIDE AREA INFORMATION SERVER SOFTWARE:
  8.    No guarantees or restrictions.  See the readme file for the full standard
  9.    disclaimer.
  10.  
  11.    This is part of the [NeXTstep] user-interface for the WAIS software.
  12.    Do with it as you please.
  13.  
  14.    Version 0.82
  15.    Wed Apr 24 1991
  16.  
  17.    jonathan@Think.COM
  18.  
  19. */
  20. //
  21. // The main method here is -search:, which returns a List of WaisDocuments (the
  22. // -resultList) upon successful search.  These results are sorted in decreasing
  23. // order of scores, which are normalized to the range 0.0 to 1.0.  The scores 
  24. // can be retrieved with the -scoreForDocument: method.
  25. //
  26.  
  27. #import "Wais.h"
  28.  
  29. extern _WaisDecoder waisRectDecoder[], waisQuestionDecoder[];
  30.  
  31. @interface WaisQuestion : Wais
  32. {
  33.     id sourceList;
  34.     id relevantList;
  35.     id resultList;
  36.     id scoreList;
  37.     unsigned int searchLimit;
  38.     int listCounter;
  39. }
  40.  
  41. // Access by string keys.
  42. + folderList;
  43. + setFolderList:aList;
  44. + (const char *)defaultHomeFolder;
  45.  
  46. // Creating and destroying questions.
  47. - initKey:(const char *)aKey;
  48. - free;
  49.  
  50. // Setting up for search.
  51. // The actual maximum number of search results is the max of the
  52. // class-wide and instance-specific searchLimits.
  53. // Instance-specific search limits are initialized to one.
  54. - setKeywords:(const char *)theText;
  55. - (const char *)keywords;
  56. - addSource:waisSource;
  57. - removeSource:waisSource;
  58. - clearSources;
  59. - sourceList;
  60. - addRelevantDocument:waisDocument;
  61. - removeRelevantDocument:waisDocument;
  62. - clearRelevantDocuments;
  63. - relevantList;
  64. - setSearchLimit:(int)maxDocs;
  65. - (int)searchLimit;
  66. + setSearchLimit:(int)maxDocs;
  67. + (int)searchLimit;
  68.  
  69. // Getting search results.
  70. - search;
  71. - resultList;
  72. - (float)scoreForDocument:waisDocument;
  73.  
  74. // Routing error messages.
  75. + (const char *)errorTitle;
  76.  
  77. // Reading/writing WAIS files.
  78. - writeWaisFile;
  79. - (short)readWaisStruct:(const char *)structName
  80.     forElement:(const char *)elementName
  81.     fromFile:(FILE *)file
  82.     withDecoder:(WaisDecoder)theDecoder;
  83. - (short)writeWaisStruct:(const char *)structName
  84.     forElement:(const char *)elementName
  85.     toFile:(FILE *)file
  86.     withDecoder:(WaisDecoder)theDecoder;
  87. + (const char *)fileStructName;
  88. + (WaisDecoder)fileStructDecoder;
  89. + (BOOL)checkFileName:(const char *)fileName;
  90.  
  91. @end
  92.  
  93.